#include "ceil.h"

/*
 * filename : abs.c
 * function : Calculates the ceiling of a value, bottom and peak function.
 * author : xiaozhi
 * copyrigth (c)  xiaozhi 2006 wise 
 */

int bottom_f(float count)
{
	return 	count > 0 ? (int)count : (int)count -1;
}

int bottom_d(double count)
{
	return count > 0 ? (int)count : (int)count - 1;
}

int peak_f(float count)
{
	return count > 0 ? (int)count + 1 : (int)count;
}

int peak_d(double count)
{
	return count > 0 ? (int)count + 1 : (int)count;
}